package day15.problem1;

//https://ac.nowcoder.com/acm/problem/205350
//平方数


import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long x = in.nextLong();
        long k = (long)Math.sqrt(x);
        long y1 = k * k, y2 = (k+1)*(k+1);
        long y ;
        if(Math.abs(x-y1) > Math.abs(x-y2)) {
            y = y2;
        }else {
            y = y1;
        }
        System.out.println(y);
    }
}